<template>
	<view class="" :style="$theme.pageStyle">
		<view class="" v-if="evaluateData.length != 0">
			<comment :list="evaluateData" :show="true"> </comment>
		</view>
		<view class="" v-else style="margin-top: 25px;">
			<u-empty
			        mode="data"
			>
			</u-empty>
		</view>
	</view>
</template>

<script>
	import $H from '@/common/js/request.js';
	import Comment from '@/components/comment.vue';
	export default {
		components: {
			Comment
		},

		data() {
			return {
				evaluateData: [],
			}
		},
		onLoad(option) {
			this.id = option.id;
		},
		onShow() {
			this.evaluate();
			if (uni.getStorageSync('token') == '') {
				this.islogin = 0
			} else {
				this.islogin = 1
				// this.loginload();
			}
		},
		
		methods: {
			//获取律师信息
			async evaluate() {
				try {
					const res = await $H.post('SvcGoods/evaluate', {
						id: this.id
					}, {
						token: true
					});
					this.evaluateData = res.data.goods_comment
				} catch (error) {
					console.error('Error fetching IndexData:', error);
				} finally {
					uni.hideLoading();
				}
			},
			Tourl(url) {
				uni.navigateTo({
					url: url
				})
			},
			
			
		}

	}
</script>

<style>
</style>